package two.chapter_1.c1_3;

import edu.princeton.cs.algs4.StdOut;


public class Ex1_3_41 {

    public static void main(String[] args) {
        Queue<Integer> q = new LinkedQueue<>();
        q.enqueue(1);
        q.enqueue(2);
        q.enqueue(3);
        q.enqueue(4);
        q.enqueue(5);

        for (Integer i : q) {
            StdOut.print(i);
        }
        StdOut.println();

        Queue<Integer> r = new LinkedQueue<>(q);
        for (Integer i : r) {
            StdOut.print(i);
        }
        StdOut.println();
        for (Integer i : q) {
            StdOut.print(i);
        }
    }


}
